<!DOCTYPE html>
<html>

	<head>
		<meta charset="UTF-8">
<title>第34章 项目1-博客前端：CSS选择器</title>
<script type="text/javascript" src="tool.js"></script>
<script type="text/javascript" src="base.js"></script>
<link rel="stylesheet" type="text/css" href="demo.css" />
</head>
<body>


<div id="box">
	<p>
		<span class="a">span</span>
	</p>
	<p>
		<span>span</span>
	</p>
	<div>
		<span id="q">span</span>
	</div>
</div>


<div>
	<p>
		<span class="a">span</span>
	</p>
	<p>
		<span>span</span>
	</p>
	<div>
		<span>span</span>
	</div>
</div>

</body>
<script>
	//$('#box').find('p').find('.a').css('color','red');
	
	$('#box div').css('color', 'red');
</script>
</html>
